# 猫 小喵喵 2岁 3公斤 爱钓鱼 爬树
class Cat:
    def __init__(self, name, age, weight):
        self.name = name
        self.age = age
        self.weight = weight
    def __str__(self):
        return '它的名字叫做:%s,今年%.1f岁,体重%.1f公斤'%(self.name,self.age,self.weight)
    def diaoyu(self):
        print('%s爱钓鱼'%(self.name))
    def pashu(self):
        print('%s爱爬树'%(self.name))

xiaomiaomiao = Cat('小喵喵', 2, 3)
xiaohuamao = Cat('小花猫', 1, 2)
xiaomiaomiao.diaoyu()
xiaomiaomiao.pashu()
xiaohuamao.diaoyu()
xiaohuamao.pashu()
print(xiaomiaomiao)
print(xiaohuamao)
addr = id(xiaomiaomiao)
addr1 = id(xiaohuamao)
print(addr)
print(addr1)